Fix size_allocate to pass on to the child even if child isn't visible.
authorElliot Lee <sopwith@src.gnome.org>
Fri, 22 May 1998 21:33:44 +0000 (21:33 +0000)
committerElliot Lee <sopwith@src.gnome.org>
Fri, 22 May 1998 21:33:44 +0000 (21:33 +0000)
Fix size_allocate to pass on to the child even if child isn't visible.
Also locate child at (border_width, border_width) not (0,0)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkeventbox.c

index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index d46f44ba276331a485ffb6cdfc4837ec55fa350f..f18865205b26af244671363e4bf1bce5b4d047d6 100644 (file)
@@ -1,3 +1,9 @@
+1998-05-22    <sopwith@redhat.com>
+
+       * gtk/gtkeventbox.c: Pass size_allocate on to the child
+       regardless of whether it is visible or not. Also
+        locate child at (border_width,border_width), not (0,0)
+
 Fri May 22 03:02:40 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkhandlebox.c: Added style_set handler.
index fb19db7b5561b7c456162c4e598d780e60baabc5..d6d699d9ff566ea69d07e61c63d4ba1304efae66 100644 (file)
@@ -161,8 +161,8 @@ gtk_event_box_size_allocate (GtkWidget     *widget,
   widget->allocation = *allocation;
   bin = GTK_BIN (widget);
 
-  child_allocation.x = 0;
-  child_allocation.y = 0;
+  child_allocation.x = GTK_CONTAINER (widget)->border_width;
+  child_allocation.y = GTK_CONTAINER (widget)->border_width;
   child_allocation.width = MAX (allocation->width - GTK_CONTAINER (widget)->border_width * 2, 0);
   child_allocation.height = MAX (allocation->height - GTK_CONTAINER (widget)->border_width * 2, 0);
 
@@ -175,7 +175,7 @@ gtk_event_box_size_allocate (GtkWidget     *widget,
                              child_allocation.height);
     }
   
-  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+  if (bin->child)
     {
       gtk_widget_size_allocate (bin->child, &child_allocation);
     }